
module.exports = {
  mode: 'universal',
  /*
  ** Headers of the page
  */
  head: {
    title: process.env.npm_package_name || '',
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ]
  },
  /*
  ** Customize the progress-bar color
  */
  loading: { color: '#00FFFF' ,height: '5px'},
  // loading: './components/loading.vue',    //自定义加载组件
  /*
  ** Global CSS
  */
  css: [
    // {src: '~assets/css/index.scss', lang:'scss'},
    // {src: '~assets/css/normailze.css'}
    // {src: '*.scss',lang: 'scss'},
    '~assets/css/index.scss',

  ],
  /*
  ** Plugins to load before mounting the App
  */
  plugins: [
   {
     src:'~/plugins/wangeditor',
     ssr:false
   },
   '~/plugins/axios',
  ],
  /*
  ** Nuxt.js dev-modules
  */
  buildModules: [
  ],
  /*
  ** Nuxt.js modules
  */
  modules: [
    '@nuxtjs/toast',
    '@nuxtjs/axios',
    // '@nuxtjs/proxy'
  ],
  toast: {// toast模块的配置
    position: 'top-center', 
    duration: 2000
  },
  // axios: {
  //   proxy: true
  // },
  // proxy: {    //能解决前端跨域问题
  //   '/api2': {
  //     target: 'http://127.0.0.1:3333',
  //     pathRewrite: {
  //       '^/api2' : '/'
  //     }
  //   }
  // },

  /*
  ** Build configuration
  */
  build: {
    /*
    ** You can extend webpack config here
    */
   vendor: ['external_library'],
    extend (config, ctx) {
    }
  }
}
